<!-- 事例 -->
<template>
  <div></div>
</template>
<script type="text/javascript">
  export default {
    components: {},
    data() {
      return {};
    },
    watch: {},
    computed: {
      //显示弹框类型
      modalStatus() {
        return this.$store.state.modalStatus;
      },
    },
    props: {
      flagindex: {
        type: Number,
        default: 1
      }
    },
    created() {},
    mounted() {},

    methods: {
      gettableData() {
        this.loading = true;
        let params = {};
        params.task_id = this.$parent.$data.currentRow.id
        let allparams = {
          params: params,
          api: 'sytaskcorn',
        }
        this.$store
          .dispatch("getmsgData", allparams)
          .then(response => {
            this.loading = false;
            let res = response.data;
            //  console.log(res)

          })
          .catch(err => {
            this.loading = false;
            console.log(err);
            this.$message.error("网络连接错误" + "sytaskcorn");
          });
      },

      post() {
        let allparams = {
          params: params,
          api: 'sytaskcorn',
          method: method,
        }
        this.$store
          .dispatch("editmsgData", allparams)
          .then(response => {
            this.loading = false;
            let res = response.data;
            //  console.log(res)
            this.$message({
              message: "操作成功",
              type: "success"
            });
            this.loading = false;
            this.modalClose();
            this.$parent.gettableData();
          })
          .catch(err => {
            this.loading = false;
            console.log(err);
            this.$message.error("网络连接错误" + "sytaskcorn");
          });
      }
    }
  };

</script>
<style scoped></style>
